package com.aizuda.boot.modules.business.contract.entity.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
import java.util.Map;

/**
 * @Author sangyirong
 * @ClassName ContractFieldShowDTO
 * @Version 1.0
 * @Date 2025/5/20 16:30
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "合同字段列表展示DTO")
public class ContractFieldShowDTO {

    @Schema(description = "字段ID")
    private Long id;

    @Schema(description = "模块ID")
    private Integer moduleId;

    @Schema(description = "父级字段ID，用于表示字段的所属关系")
    private Long parentFieldId;

    @Schema(description = "子字段")
    private List<ContractFieldShowDTO> children;

    @Schema(description = "字段名称")
    private String fieldName;

    @Schema(description = "字段唯一编码code")
    private String code;

    @Schema(description = "字段类型")
    private String fieldType;

    @Schema(description = "字段选项（JSON格式转换为Map）")
    private Map<String, Object> fieldOptions;

    @Schema(description = "该字段是否必填")
    private Boolean isRequired;

    @Schema(description = "是否启用该字段")
    private Boolean isEnabled;

    @Schema(description = "字段是否系统字段")
    private Boolean isSystem;

    @Schema(description = "字段在该模块中的显示顺序")
    private Integer fieldOrder;

    @Schema(description = "是否需要展示")
    private Boolean isShow;

}
